"""
@author: zjc
@file: lianxi.py
@time: 2022/11/24 17:53
"""
# 1.python实现tree命令
# import os
# import os.path
#
# def tree(path, depth=0):
#     if depth == 0:
#         print(path)
#     items = os.listdir(path)
#     for item in items:
#         # 输出文件夹中的文件和子文件夹名
#         print('|    ' * depth, end='')
#         print('|----', item)
#         item = os.path.join(path, item)
#         if os.path.isdir(item):
#             # 递归遍历子目录
#             tree(item, depth + 1)
# tree(r'E:/python代码/2022-11-24')
#2.
from zjc import r_jhm
while True:
    try:
        N=int(input("请输入一个数:"))
        r_jhm(N)
        break
    except ValueError:
        print("你的输入有误,请重新输入!")


